<?php
    defined('_VALID_MOS') or die(include_once("../../404.php"));

    $sqlHotNews = "SELECT `news`.`News_Id`, `news`.`Title`, `news`.`alias`, `news`.`Description`, `news`.`img_file`,`news`.`img_status`,
		Date_Format(`news`.`Date`, '%d/%m/%Y - %h:%m') AS `date_add`, DateDiff(CurDate(), `news`.`Date`) AS `Expires`
		FROM `news`
		WHERE `news`.`num_view` > ? 
                ORDER BY `news`.`Date` DESC 
                LIMIT 0, ? ";


    $hits = 15;

    $limit = 10;
    $cmdHotNews = $mysqli->prepare($sqlHotNews);
    $cmdHotNews->bind_param("ss", $hits, $limit);
    $cmdHotNews->execute() or die($mysqli->error);
    $cmdHotNews->bind_result($News_Id, $Title, $alias, $Description, $img_file, $img_status, $date_add, $Expires);
    $cmdHotNews->store_result();
?>

<style>
    ul.hot_new
    {
        list-style: none;

        border: 0px solid red;
    }
    ul.hot_new li
    {
        text-align: left;   
        line-height:20px;
        border-bottom: 1px dashed #c2c2c2;
        padding: 5px 0px;
    }
    ul.hot_new li a:link,
    ul.hot_new li a:visited 
    { 
        font-family: Times New Roman;
        font-size:15px; 
        color:#3287da; 
        text-decoration:none;
        font-weight: bold;
    }
    ul.hot_new li a:hover { text-decoration:underline; }
    ul.hot_new li a:active {text-decoration:none;} 
</style>




<div id="component">
    <p class="d_title">Tin xem nhiều</p>
    <div class="content">
        <ul class="hot_new">
            <?php
                while($cmdHotNews->fetch())
                {
                    ?>            		
                    <li><a class="d_title" href="<?php echo "./com_content/article/$alias/" . $News_Id . ".htm"; ?>"><?php echo $Title; ?></a></li>
                    <?php
                }
            ?>
        </ul>
    </div>
</div>